package mx.tarhimurhu.amoxcalli;

import java.io.Serializable;

import mx.tarhimurhu.amoxcalli.Author;
import mx.tarhimurhu.amoxcalli.Entry;



/**
 * @author Alberto Garcia
 */
public class Article implements Entry, Serializable 
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -1947369857226278819L;
	private Author[] authors;
	/*private int dateOfPublication;
	private String articleTitle;
	private String journalTitle;
	private int volumeNumber;
	private int issueNumer;
	private String pageNumbers;*/
	
	
	
	
	
	/*
	 * 
	 * Constructor instantiates all instance variables
	 * 
	 */
	public Article(Author[] authors)
	{
		this.authors = authors;
		/*this.dateOfPublication = dateOfPublication;
		this.articleTitle = articleTitle;
		this.journalTitle = journalTitle;
		this.volumeNumber = volumeNumber;
		this.issueNumer = issueNumber;
		this.pageNumbers = pageNumbers;
		*/
	}
	
	
	
	public Article() 
	{
		Author[] a = {new Author("", "", "")};
		
		this.authors = a;
		/*this.dateOfPublication = 0;
		this.articleTitle = "";
		this.journalTitle = "";
		this.volumeNumber = 0;
		this.issueNumer = 0;
		this.pageNumbers = "";*/ 
	}





	/***********************************************************************************************
	 * 	
	 * Getters and Setters
	 * 
	 ***********************************************************************************************/
	
	public Author[] getAuthors() {
		return authors;
	}

	public void setAuthors(Author[] authors) {
		this.authors = authors;
	}

	/*public int getDateOfPublication() {
		return dateOfPublication;
	}

	public void setDateOfPublication(int dateOfPublication) {
		this.dateOfPublication = dateOfPublication;
	}

	public String getArticleTitle() {
		return articleTitle;
	}

	public void setArticleTitle(String articleTitle) {
		this.articleTitle = articleTitle;
	}

	public String getJournalTitle() {
		return journalTitle;
	}

	public void setJournalTitle(String journalTitle) {
		this.journalTitle = journalTitle;
	}

	public int getVolumeNumber() {
		return volumeNumber;
	}

	public void setVolumeNumber(int volumeNumber) {
		this.volumeNumber = volumeNumber;
	}

	public int getIssueNumer() {
		return issueNumer;
	}

	public void setIssueNumer(int issueNumer) {
		this.issueNumer = issueNumer;
	}

	public String getPageNumbers() {
		return pageNumbers;
	}

	public void setPageNumbers(String pageNumbers) {
		this.pageNumbers = pageNumbers;
	}*/
	
	
	public String toString()
	{
		String s = "";
		for(Author a: authors){s += a.toString() + "\n";};
		return s;
	}
}
